<div class="modal-header">
    <h3 class="modal-title">{{'advanced_search' | translate }} <i ng-click="cancel()" class="fa fa-times pull-right"></i></h3>
</div>
<style>
    #search-options .btn{
        background: white;
        border-radius: 2px;
        padding: 2px 15px;
        border: 1px solid #eee;
        margin-top:5px;
        outline: none;
    }
    #search-options .btn.active{
        border: 1px solid #797979;
        background: #797979;
        color: white;
        outline: none;
    }
    #search-options p.title,#search-options label.title{
        font-weight:bold;
        line-height:16px;
    }
    #search-options input{
        border-radius: 2px;
    }
</style>
<div class="modal-body" id="search-options" >
    <form>
        <div class="form-group">
            <p class="title">{{'file_type_is' | translate }}: </p>
            <button class="btn" ng-class="{'active':type=='pdf','':type!='pdf'}" ng-click="setTypeAndArg('pdf','type')">{{ 'pdf' | translate }}</button>
            <button class="btn" ng-class="{'active':type=='zip','':type!='zip'}" ng-click="setTypeAndArg('zip','type')">{{ 'zip' | translate }}</button>
            <button class="btn" ng-class="{'active':type=='image','':type!='image'}" ng-click="setTypeAndArg('image','type')">{{ 'image' | translate }}</button>
            <button class="btn" ng-class="{'active':type=='excel','':type!='excel'}" ng-click="setTypeAndArg('excel','type')">{{ 'excel' | translate }}</button>
            <button class="btn" ng-class="{'active':type=='video','':type!='video'}" ng-click="setTypeAndArg('video','type')">{{ 'video' | translate }}</button>
            <button class="btn" ng-class="{'active':type=='text','':type!='text'}" ng-click="setTypeAndArg('text','type')">{{ 'text' | translate }}</button>
            <button class="btn" ng-class="{'active':type=='html','':type!='html'}" ng-click="setTypeAndArg('html','type')">{{ 'html' | translate }}</button>
            <button class="btn" ng-class="{'active':type=='ppt','':type!='ppt'}" ng-click="setTypeAndArg('ppt','type')">{{ 'ppt' | translate }}</button>
            <button class="btn" ng-class="{'active':type=='word','':type!='word'}" ng-click="setTypeAndArg('word','type')">{{ 'word' | translate }}</button>
        </div>
        <div class="form-group" title="{{'file_name' | translate }}">
            <label for="name-contains">{{'file_name_contains' | translate }}: </label>
            <input class="form-control" id="name-contains" type="text" ng-model="fileName" placeholder="{{ 'file_name_contains' | translate}}">
        </div>
        <!--<div class="form-group" title="file_name">-->
            <!--<p class="title">{{'file_content_contains' | translate }}: </p>-->
            <!--<input class="form-control" type="text">-->
        <!--</div>-->
        <div class="form-group" title="{{'last_modification_date' | translate }}">
            <p class="title">{{'date_last_modified_is' | translate }}: </p>
            <button class="btn" ng-class="{'active':lastModifiedDate=='today','':type!='today'}" ng-click="setTypeAndArg('today','lastModifiedDate',0)">{{ 'today' | translate }}</button>
            <button class="btn" ng-class="{'active':lastModifiedDate=='yesterday','':type!='yesterday'}" ng-click="setTypeAndArg('yesterday','lastModifiedDate',1)">{{ 'yesterday' | translate }}</button>
            <button class="btn" ng-class="{'active':lastModifiedDate=='within_last_week','':type!='within_last_week'}" ng-click="setTypeAndArg('within_last_week','lastModifiedDate',7)">{{ 'within_last_week' | translate }}</button>
            <button class="btn" ng-class="{'active':lastModifiedDate=='within_last_month','':type!='within_last_month'}" ng-click="setTypeAndArg('within_last_month','lastModifiedDate',30)">{{ 'within_last_month' | translate }}</button>
            <button class="btn" ng-class="{'active':lastModifiedDate=='within_90_days','':lastModifiedDate!='within_90_days'}" ng-click="setTypeAndArg('within_90_days','lastModifiedDate',90)">{{ 'within_90_days' | translate }}</button>
            <!--<button class="btn" ng-class="{'active':lastModifiedDate=='2_6_month_ago','':type!='2_6_month_ago'}" ng-click="setTypeAndArg('2_6_month_ago','lastModifiedDate')">{{ '2_6_month_ago' | translate }}</button>-->
            <!--<button class="btn" ng-class="{'active':lastModifiedDate=='7_12_months_ago','':type!='7_12_months_ago'}" ng-click="setTypeAndArg('7_12_months_ago','lastModifiedDate')">{{ '7_12_months_ago' | translate }}</button>-->
            <button class="btn" ng-class="{'active':lastModifiedDate=='a_year_ago','':type!='a_year_ago'}" ng-click="setTypeAndArg('a_year_ago','lastModifiedDate',365)">{{ 'a_year_ago' | translate }}</button>
        </div>
        <div class="form-group" title="{{'last_added_date' | translate }}">
            <p class="title">{{'date_add_by' | translate }}: </p>
            <button class="btn" ng-class="{'active':lastAddedDate=='today','':lastAddedDate!='today'}" ng-click="setTypeAndArg('today','lastAddedDate',0)">{{ 'today' | translate }}</button>
            <button class="btn" ng-class="{'active':lastAddedDate=='yesterday','':lastAddedDate!='yesterday'}" ng-click="setTypeAndArg('yesterday','lastAddedDate',1)">{{ 'yesterday' | translate }}</button>
            <button class="btn" ng-class="{'active':lastAddedDate=='within_last_week','':lastAddedDate!='within_last_week'}" ng-click="setTypeAndArg('within_last_week','lastAddedDate',7)">{{ 'within_last_week' | translate }}</button>
            <button class="btn" ng-class="{'active':lastAddedDate=='within_last_month','':lastAddedDate!='within_last_month'}" ng-click="setTypeAndArg('within_last_month','lastAddedDate',30)">{{ 'within_last_month' | translate }}</button>
            <button class="btn" ng-class="{'active':lastAddedDate=='within_90_days','':lastAddedDate!='within_90_days'}" ng-click="setTypeAndArg('within_90_days','lastAddedDate',90)">{{ 'within_90_days' | translate }}</button>
            <!--<button class="btn" ng-class="{'active':lastAddedDate=='2_6_month_ago','':lastAddedDate!='2_6_month_ago'}" ng-click="setTypeAndArg('2_6_month_ago','lastAddedDate')">{{ '2_6_month_ago' | translate }}</button>-->
            <!--<button class="btn" ng-class="{'active':lastAddedDate=='7_12_months_ago','':lastAddedDate!='7_12_months_ago'}" ng-click="setTypeAndArg('7_12_months_ago','lastAddedDate')">{{ '7_12_months_ago' | translate }}</button>-->
            <button class="btn" ng-class="{'active':lastAddedDate=='a_year_ago','':lastAddedDate!='a_year_ago'}" ng-click="setTypeAndArg('a_year_ago','lastAddedDate',365)">{{ 'a_year_ago' | translate }}</button>
        </div>
        <div class="form-group hide" title="{{'last_viewed_date' | translate }}" style="">
            <p class="title">{{'date_last_viewed_is' | translate }}: </p>
            <button class="btn" ng-class="{'active':lastViewedDate=='today','':lastViewedDate!='today'}" ng-click="setTypeAndArg('today','lastViewedDate',0)">{{ 'today' | translate }}</button>
            <button class="btn" ng-class="{'active':lastViewedDate=='yesterday','':lastViewedDate!='yesterday'}" ng-click="setTypeAndArg('yesterday','lastViewedDate',1)">{{ 'yesterday' | translate }}</button>
            <button class="btn" ng-class="{'active':lastViewedDate=='within_last_week','':lastViewedDate!='within_last_week'}" ng-click="setTypeAndArg('within_last_week','lastViewedDate',7)">{{ 'within_last_week' | translate }}</button>
            <button class="btn" ng-class="{'active':lastViewedDate=='within_last_month','':lastViewedDate!='within_last_month'}" ng-click="setTypeAndArg('within_last_month','lastViewedDate',30)">{{ 'within_last_month' | translate }}</button>
            <!--<button class="btn" ng-class="{'active':lastViewedDate=='within_90_days','':lastViewedDate!='within_90_days'}" ng-click="setTypeAndArg('within_90_days','lastViewedDate',90)">{{ 'within_90_days' | translate }}</button>-->
            <!--<button class="btn" ng-class="{'active':lastViewedDate=='2_6_month_ago','':lastViewedDate!='2_6_month_ago'}" ng-click="setTypeAndArg('2_6_month_ago','lastViewedDate')">{{ '2_6_month_ago' | translate }}</button>-->
            <!--<button class="btn" ng-class="{'active':lastViewedDate=='7_12_months_ago','':lastViewedDate!='7_12_months_ago'}" ng-click="setTypeAndArg('7_12_months_ago','lastViewedDate')">{{ '7_12_months_ago' | translate }}</button>-->
            <!--<button class="btn" ng-class="{'active':lastViewedDate=='a_year_ago','':lastViewedDate!='a_year_ago'}" ng-click="setTypeAndArg('a_year_ago','lastViewedDate',365)">{{ 'a_year_ago' | translate }}</button>-->
        </div>
        <div class="form-group hide" title="{{'file_add_by' | translate }}" style="">
            <p class="title">{{'file_add_by' | translate }}: </p>
            <!--   https://jira.foxitsoftware.cn/browse/CBASE-525 -->
            <!--    1. Foxit MobilePDF for Windows  fxt_mb_win
                    2. Cloud Reading Web            cloud_reading_web
                    3. Foxit MobilePDF for iOS      fxt_mb_ios
                    4. Foxit MobilePDF for Android  fxt_mb_and
                    5. Foxit Reader for Mac         reader_mac
                    6. Foxit Reader for Linux       reader_linux
            -->
            <button class="btn" ng-class="{'active':fileAddedBy=='fxt_mb_win','':fileAddedBy!='fxt_mb_win'}" ng-click="setTypeAndArg('fxt_mb_win','fileAddedBy')">{{ 'fxt_mb_win' | translate }}</button>
            <button class="btn" ng-class="{'active':fileAddedBy=='cloud_reading_web','':fileAddedBy!='cloud_reading_web'}" ng-click="setTypeAndArg('cloud_reading_web','fileAddedBy')">{{ 'cloud_reading_web' | translate }}</button>
            <button class="btn" ng-class="{'active':fileAddedBy=='fxt_mb_ios','':fileAddedBy!='fxt_mb_ios'}" ng-click="setTypeAndArg('fxt_mb_ios','fileAddedBy')">{{ 'fxt_mb_ios' | translate }}</button>
            <button class="btn" ng-class="{'active':fileAddedBy=='fxt_mb_and','':fileAddedBy!='fxt_mb_and'}" ng-click="setTypeAndArg('fxt_mb_and','fileAddedBy')">{{ 'fxt_mb_and' | translate }}</button>
            <button class="btn" ng-class="{'active':fileAddedBy=='reader_mac','':fileAddedBy!='reader_mac'}" ng-click="setTypeAndArg('reader_mac','fileAddedBy')">{{ 'reader_mac' | translate }}</button>
            <button class="btn" ng-class="{'active':fileAddedBy=='reader_linux','':fileAddedBy!='reader_linux'}" ng-click="setTypeAndArg('reader_linux','fileAddedBy')">{{ 'reader_linux' | translate }}</button>
            <!--<button class="btn" ng-class="{'active':fileAddedBy=='device_reader_web','':fileAddedBy!='device_reader_web'}" ng-click="setTypeAndArg('device_reader_web','fileAddedBy')">{{ 'device_reader_web' | translate }}</button>-->
        </div>
        <!--<div class="">-->
            <!--<p class="title">{{'chosen_labels' | translate }}: </p>-->
        <!--</div>-->
    </form>
</div>
<div class="modal-footer">
    <button class="btn btn-right-aside" type="button" ng-click="search()">{{'search_btn' | translate }}</button>
    <button class="btn btn-default" type="button" ng-click="reset()">{{'reset_options' | translate }}</button>
</div>